<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>商品信息</title>

<link rel="stylesheet" href="//apps.bdimg.com/libs/jqueryui/1.10.4/css/jquery-ui.min.css">
<link rel="stylesheet" type="text/css" href="CSS/CSSproductshow.css" />

  <script src="//apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
  <script src="//apps.bdimg.com/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>


<script>
    $( function(){
		$("#tabs").tabs({
			event:"mouseover"
			});
		});


  $(document).ready(function() {
	  $("#ps01 img").click(function(){

         
		  
		  var ps02img = $(this).attr('src');
		  $("#ps02 img").attr('src', ps02img);
		  });
		  
	  $("#ps01 img").click(function(){
		  
	         $("#ps01 img").removeClass('imgselected').$(this).addClass('imgselected');
		  
		  
		  });
		  

		  

    

   
	   
	  
    
 
});
</script>

</head>

<body>

<?php
include "head.php";

include "mysql.php";
$aa = new mysql;
$aa->link("");
?>
   
<div id="tbody" style="width: 1100px; height: 1000px; margin: 0 auto; border: 0px solid #000">
    <div id="menu2"> 
            <ul>
                
          <?php
		        //循环输出menu1，并赋id给其超链接
		    $query1 = "select * from product_class order by show_order";
			$result1 = $aa->excu($query1);
			while ($product_class = mysqli_fetch_array($result1, MYSQLI_ASSOC))	{	

		?>
                
                
                <li><a href="shoppingmall.php?action=creat&id=<?php echo $product_class['id']; ?>">
				<?php echo $product_class['class_name']; ?></a>

                </li>
          <?php
			      }
	   	?>
            </ul>
        </div> 
        
        
        <!--product_info-->  
      
          <!--商品购买信息-->
          <div id="ps">
              <div class="left" id="ps01">
                  <div>
                  <ul>
                       <?php  
					          $productid= @$_GET["id"];
							  // var_dump ($productid); 
							  $query = "select * from product_info where id = $productid ";
			                  $result = $aa->excu($query);
                              $product = mysqli_fetch_array($result, MYSQLI_ASSOC);
                              $img = $product['imgsrc'];  $img = explode("#", $img);  $num = count($img); 
				            for($i = 0; $i < $num; $i++){  ?>
                    <li><img src="<?php echo $img[$i]; ?>" onClick="this.style.border = '2px solid #CCC'" /></li>
                        <?php } ?>
                  </ul>
                  </div>
              </div>
              
              <div class="left" id="ps02">
                  <div>
                    <img src="<?php echo $img[0]; ?>" alt="哈哈，没有图片！" />
                  </div>
              </div>
              
              <div class="left" id="ps03">
                  <div>
                   
                  </div>
              </div>
          
          </div>
          
          
      <div id="tabs">
          <ul>
              <li><a href="#tabs-1">商品信息</a></li>
              <li><a href="#tabs-2">技术规格</a></li>
              <li><a href="#tabs-3">用户评价</a></li>
          </ul>
          <!--产品详细信息-->
          <div id="tabs-1">
              
          <p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p>
          
          </div>
          <!--技术规格-->
          <div id="tabs-2">
              
          <p>Proempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquamllus ipsum. Nunc tristique tempus lectus.</p>
          
          </div>
          <!--用户评价-->
          <div id="tabs-3">
              
             <p>PrCurabitur nec arcu. Done. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et maurisut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p>
              
          </div>
      
      
      
      </div>

</div>
<?php
include "foot.php";
?>
</body>
</html>